package com.kzj.controller;

import com.kzj.common.re.Result;
import com.kzj.service.StatisticsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

//@CrossOrigin(origins = "/**")
@RestController
@CrossOrigin(origins = "/**")
@RequestMapping("/statistics")
@Api(tags = "统计相关接口")
public class StatisticsController {
    @Autowired
    StatisticsService statisticsService;
    @PostMapping("/pie")
    @ApiOperation("")
    public Result pie()
    {
        return statisticsService.pie();
    }
    @PostMapping("lineChart")
    @ApiOperation("")
    public Result lineChart()
    {
        return statisticsService.lineChart();
    }
    @PostMapping("list")
    @ApiOperation("")
    public  Result list()
    {
        return statisticsService.list();
    }
    @PostMapping("rankingList")
    @ApiOperation("")
    public Result rankingList()
    {
        return statisticsService.rankingList();
    }

}
